<script setup lang="ts">
import { defineProps } from 'vue'

defineProps({
  prefix: {
    type: String,
    default: '#icon-'
  },
  name: {
    type: String,
    default: ''
  },
  color: {
    type: String,
    default: 'yellow'
  },
  width: {
    default: 20
  },
  height: {
    default: 20
  }
})
</script>

<template>
  <!-- 测试sng图标的使用 -->
  <svg :style="'width: ' + width + 'px; height: ' + height + 'px;'">
    <!-- xlink:href="#icon-{此处拼接图标名字}  " -->
    <use :xlink:href="prefix + name" :fill="color"></use>
  </svg>
</template>

<style scoped></style>
